<template>
    <div>
        <Bread title="Chance / Customer Management"/>

        <el-row :gutter="40">
            <el-col :span="15">
                <CustomerSearch ref="CustomerSearch" :options="options" :callback="CustomerQuery"/>
                <CustomerData :options="options" :loadCustomer="loadCustomer" ref="CustomerData"/>

            </el-col>
            <el-col :span="9">
                <CustomerStatic/>
            </el-col>
        </el-row>
    </div>
</template>

<script>
import Bread from "@/components/Bread/Bread";
import CustomerSearch from "@/views/NPMS/Customer/CustomerManage/CustomerSearch";
import CustomerStatic from "@/views/NPMS/Customer/CustomerManage/CustomerStatic";
import CustomerData from "@/views/NPMS/Customer/CustomerManage/CustomerData";
import {options} from "@/data/const";

export default {
    name: "Customer",
    components: {CustomerData, CustomerStatic, CustomerSearch, Bread},
    data() {
        return {
            options: options
        }
    },
    methods: {
        CustomerQuery(queryCondition) {
            this.$refs.CustomerData.queryCustomer(queryCondition)
        },
        loadCustomer() {
            var queryCondition = this.$refs.CustomerSearch.getQueryCondition();
            this.$refs.CustomerData.queryCustomer(queryCondition)
        }

    }
}
</script>

<style scoped>


</style>